function [ out ] = p2( img, alpha )  
    level = threshold(img, alpha);
    out = img;
    out(:) = max(img(:), level);
end

